//
//  error.h
//  IOS_SST
//
//  Created by lfy on 16/4/27.
//  Copyright © 2016年 jiahua. All rights reserved.
//

#ifndef error_h
#define error_h

#define SST_OK                           0
#define SST_GTE_KEY_FROM_CLOUD_ERROR    -1          //从云端获取密钥失败
#define SST_JSSON_ERROR                 -100        //jason解析失败
#define SST_HTTP_ERROR                  -101        //发送http请求失败
/*110: 密钥协商cmd出错
111: 密钥协商接收或发送失败
112: 密钥协商DatagramSocket初始化失败
113: 密钥协商接收超时
114: 密钥协商收到Error
20:	AES加密失败
200:	AES加密 InvalidAlgorithmParameterException
201:	AES加密 NoSuchAlgorithmException
202:	AES加密 NoSuchPaddingException
203:	AES加密 InvalidKeyException
204:	AES加密 IllegalBlockSizeException
205:	AES加密 BadPaddingException
21:	AES解密失败
210:	AES解密 InvalidAlgorithmParameterException
211:	AES解密 NoSuchAlgorithmException
212:	AES解密 NoSuchPaddingException
213:	AES解密 InvalidKeyException
214:	AES解密 IllegalBlockSizeException
215:	AES解密 BadPaddingException
22:	哈希值计算失败 NoSuchAlgorithmException
 */

#define SST_NO_DEVICE_INFO_ERROR                -300        //没有找到家电信息，请调用setDeviceInformation
#define SST_PACKET_DAMAGE_ERROR                 -301        //包损坏
#define SST_EncryptLen_SYM_BLOCK_LEN_ERROR      -302        //EncryptLen%SYM_BLOCK_LEN != 0
#define SST_MEMCPY_ERROR                        -303        //tmpData复制异常为0
#define SST_HASH_ERROR                          -304        //哈希异常
#define SST_REPEAT_ERROR                        -305        //重放攻击
#define SST_SESSION_ID_ERROR                    -306        //sessionID is null
#define SST_DEVICE_DECODE_ERROR                 -307        //家电端解密错误
#define SST_SOCKET_BIND_ERROR                   -308        //socket绑定错误
#define SST_SOCKET_INIT_ERROR                   -309        //socket 初始化错误
#define SST_HANDSHAKE_ERROR                     -310        //秘钥协商失败
#define SST_PACAKGE_ERROR                       -312        //包被破坏
#endif /* error_h */
